package dispatch;
sub new {
    my ($class) = @_;
    return bless( {},$class);
}
sub reg {
    my ($self,$key,$value_func_ref) = @_;
    $$self{$key} = $value_func_ref;
}

sub call_func {
    my ($self,$key,@param) = @_;
    $func_ref = $self->{$key};
    &$func_ref(@param);
}
sub DESTORY {
    my ($self) = @_;

}
our $ds = dispatch::new("dispatch");
1;